YES 0.842
H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/empty.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:
↳ HASKELL
↳ LR
mainModule Main
| ((splitAt :: Int -> [a] -> ([a],[a])) :: Int -> [a] -> ([a],[a])) |
module Main where
Lambda Reductions:
The following Lambda expression
\(xs',_)→xs'
is transformed to
The following Lambda expression
\(_,xs'')→xs''
is transformed to
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
mainModule Main
| ((splitAt :: Int -> [a] -> ([a],[a])) :: Int -> [a] -> ([a],[a])) |
module Main where
Replaced joker patterns by fresh variables and removed binding patterns.
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
mainModule Main
| ((splitAt :: Int -> [a] -> ([a],[a])) :: Int -> [a] -> ([a],[a])) |
module Main where
Cond Reductions:
The following Function with conditions
is transformed to
undefined0 | True | = undefined |
undefined1 | | = undefined0 False |
The following Function with conditions
splitAt | n xs | |
splitAt | vw [] | = ([],[]) |
splitAt | n (x : xs) | =
(x : xs',xs'') |
where |
vu42 | | = splitAt (n - 1) xs |
|
| |
| |
| |
| |
|
is transformed to
splitAt | n xs | = splitAt3 n xs |
splitAt | vw [] | = splitAt1 vw [] |
splitAt | n (x : xs) | = splitAt0 n (x : xs) |
splitAt0 | n (x : xs) | =
(x : xs',xs'') |
where |
vu42 | | = splitAt (n - 1) xs |
|
| |
| |
| |
| |
|
splitAt1 | vw [] | = ([],[]) |
splitAt1 | ww wx | = splitAt0 ww wx |
splitAt2 | n xs True | = ([],xs) |
splitAt2 | n xs False | = splitAt1 n xs |
splitAt3 | n xs | = splitAt2 n xs (n <= 0) |
splitAt3 | wy wz | = splitAt1 wy wz |
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
mainModule Main
| ((splitAt :: Int -> [a] -> ([a],[a])) :: Int -> [a] -> ([a],[a])) |
module Main where
Let/Where Reductions:
The bindings of the following Let/Where expression
(x : xs',xs'') |
where |
vu42 | | = splitAt (n - 1) xs |
|
| |
| |
| |
| |
are unpacked to the following functions on top level
splitAt0Xs' | xu xv | = splitAt0Xs'0 xu xv (splitAt0Vu42 xu xv) |
splitAt0Xs''0 | xu xv (vx,xs'') | = xs'' |
splitAt0Xs'' | xu xv | = splitAt0Xs''0 xu xv (splitAt0Vu42 xu xv) |
splitAt0Xs'0 | xu xv (xs',vy) | = xs' |
splitAt0Vu42 | xu xv | = splitAt (xu - 1) xv |
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
↳ HASKELL
↳ NumRed
mainModule Main
| ((splitAt :: Int -> [a] -> ([a],[a])) :: Int -> [a] -> ([a],[a])) |
module Main where
Num Reduction: All numbers are transformed to thier corresponding representation with Pos, Neg, Succ and Zero.
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
mainModule Main
| (splitAt :: Int -> [a] -> ([a],[a])) |
module Main where
Haskell To QDPs
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ QDP
↳ QDPSizeChangeProof
Q DP problem:
The TRS P consists of the following rules:
new_splitAt0Vu42(xw300, xw41, ba) → new_splitAt(new_primMinusNat(xw300), xw41, ba)
new_splitAt(Pos(Succ(xw300)), :(xw40, xw41), ba) → new_splitAt(new_primMinusNat(xw300), xw41, ba)
new_splitAt(Pos(Succ(xw300)), :(xw40, xw41), ba) → new_splitAt0Vu42(xw300, xw41, ba)
The TRS R consists of the following rules:
new_primMinusNat(Succ(xw3000)) → Pos(Succ(xw3000))
new_primMinusNat(Zero) → Pos(Zero)
The set Q consists of the following terms:
new_primMinusNat(Zero)
new_primMinusNat(Succ(x0))
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_splitAt(Pos(Succ(xw300)), :(xw40, xw41), ba) → new_splitAt0Vu42(xw300, xw41, ba)
The graph contains the following edges 1 > 1, 2 > 2, 3 >= 3
- new_splitAt(Pos(Succ(xw300)), :(xw40, xw41), ba) → new_splitAt(new_primMinusNat(xw300), xw41, ba)
The graph contains the following edges 2 > 2, 3 >= 3
- new_splitAt0Vu42(xw300, xw41, ba) → new_splitAt(new_primMinusNat(xw300), xw41, ba)
The graph contains the following edges 2 >= 2, 3 >= 3